<?php

namespace Wap\Controller;
class LawyerCenterController extends CommonController{

	public function perfect_data(){
		$this->user_id();
		$this->is_show_footer = false;
		$this->add_step('完善资料');
		if(IS_POST){
			$realname    = $this->_post('realname', '姓名不能为空！');
			$sex         = $this->_post('sex', '请选择性别！');
			$practice_no = $this->_post('practice_no', '执业证号不能为空！');
			$work_unit   = $this->_post('work_unit', '工作单位不能为空！');
			$skilled_id  = $this->_post('skilled_id', '请选择擅长领域！');

			if(D('User')->edit_info($this->user_id, $realname, $nickname, $sex)){
				D('User')->edit_lawyer_info($this->user_id, 0, $practice_no, $work_unit, $skilled_id);
				$this->success('修改成功！', U('perfect_data'));
			}else{
				$this->error(D('User')->tips_info);
			}
		}
		// var_dump($this->user);
		$this->display();
	}
}